//
//  DeviceView.m
//  Kids
//
//  Created by LiTengFei on 14/11/26.
//  Copyright (c) 2014年 90's Technology Co.Ltd. All rights reserved.
//

#import "DeviceView.h"
#import "UIImageView+WebCache.h"
@implementation DeviceView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self commentInstance];
    }
    return self;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self commentInstance];
    }
    return self;
}
- (void)commentInstance
{
    self.deviceImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 10, 50, 50)];

    [self addSubview:self.deviceImageView];
}

- (void)setDeviceData:(WatchModel*)deviceData
{

    [self.deviceImageView sd_setImageWithURL:[NSURL URLWithString:deviceData.wimage] placeholderImage:[UIImage imageNamed:@"photo_size"]];
    self.deviceData.location = CLLocationCoordinate2DMake(30.929641, arc4random() % 180);
}
@end
